package org.example.proxy2;

/**
 *
 */
public class UserServiceProxy implements UserService{
    UserServiceImpl usi;

    public UserServiceProxy(UserServiceImpl usi) {
        this.usi = usi;
    }

    @Override
    public void add() {
        System.out.println("日志记录开始");
        usi.add();
        System.out.println("日志记录结束");
    }

    @Override
    public void update() {
        System.out.println("日志记录开始");
        usi.update();
        System.out.println("日志记录结束");
    }

    @Override
    public void delete() {
        System.out.println("日志记录开始");
        usi.delete();
        System.out.println("日志记录结束");
    }

    @Override
    public void getById() {
        System.out.println("日志记录开始");
        usi.getById();
        System.out.println("日志记录结束");
    }

    @Override
    public void getAll() {
        System.out.println("日志记录开始");
        usi.getAll();
        System.out.println("日志记录结束");
    }
}
